﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<CognisessWeb.Models.MenusModel>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>

    <table>
        <tr>
            <th>
                Id
            </th>
            <th>
                Title
            </th>
            <th>
                MenuContent
            </th>
            <th>
                SubprimeTitle
            </th>
            <th>
                SubprimeContent
            </th>
            <th>
                Edit
            </th>
        </tr>

    <% foreach (var item in Model) {
           foreach (var title in item.Navigations)
           {               
           %>
    
        <tr>
            
            <td>
                <%= Html.Encode(item.Id) %>
            </td>
            <td>
                <%= Html.Encode(title.TitleName) %>
            </td>
            <td>
                <%= Html.Encode(item.MenuContent) %>
            </td>
            <td>
                <%= Html.Encode(item.SubprimeTitle) %>
            </td>
            <td>
                <%= Html.Encode(item.SubprimeContent) %>
            </td>
            <td align="center">
            <a href="/Menu/Edit/<%=item.Id %>">
                    <img src='../../Content/images/backstage_img5.gif' alt="Edit" /></a> 
            </td>
        </tr>
    
    <% }
       } %>

    </table>

</asp:Content>

